#include <string.h>
#include <clutter/clutter.h>

#define NOOP_VERTEX \
    "void main(void) {gl_Position = ftransform();}"

int main(int argc, char **argv)
{
    clutter_init(&argc, &argv);
    ClutterActor *stage = clutter_stage_get_default();
    ClutterColor color = {0x00, 0x00, 0xff, 0xff};
    ClutterShader *shader = clutter_shader_new();
    clutter_shader_set_vertex_source(shader, NOOP_VERTEX, strlen(NOOP_VERTEX));

    ClutterActor *rect = clutter_rectangle_new_with_color(&color);
    clutter_actor_set_size(rect, 100, 100);
    clutter_container_add_actor(CLUTTER_CONTAINER(stage), rect);
    if (clutter_actor_set_shader(rect, shader)) {
	g_print("shader is applied\n");
    }

    rect = clutter_rectangle_new_with_color(&color);
    clutter_actor_set_size(rect, 100, 100);
    clutter_actor_set_position(rect, 110, 0);
    clutter_container_add_actor(CLUTTER_CONTAINER(stage), rect);

    clutter_actor_show_all(stage);
    clutter_main();
    return 0;
}
